#pragma once
#include "MyRuleStruct.h"
#define MYPOPDLGXMLNAME _T("pop_dlg.xml")
class BaseDialog;
class CMyDefencePopDlg:public CWindowWnd, public INotifyUI
{
public:
	CMyDefencePopDlg(BaseDialog *pDlg);
	virtual ~CMyDefencePopDlg();
protected:
protected:
	virtual LPCTSTR GetWindowClassName() const { return _T("mogu defense pop dlg"); }

	virtual void Notify(TNotifyUI& msg);
	virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);

	// custom message map
	typedef HRESULT(CMyDefencePopDlg::*CustomMsgHandler)(WPARAM, LPARAM, BOOL&);
	typedef std::map<UINT, CustomMsgHandler> MessageMap;
	virtual MessageMap* InitMessageMap();

	// custom message handler
	HRESULT OnCreate(WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	HRESULT OnNcHitTest(WPARAM wParam, LPARAM lParam, BOOL& bHandled);

private:


	HRESULT OnTimer(WPARAM wParam, LPARAM lParam, BOOL& bHandled);
private:
	CPaintManagerUI m_pm;
	CTextUI *m_pTxt_intention;
	CTextUI *m_pTxt_src_path;
	CTextUI *m_pTxt_des_path;
	CButtonUI *m_pBtn_permit;
	CButtonUI *m_pBtn_stop;
	ULONG m_uTime;
	BOOL m_bPermit;
	CControlUI *m_pCombo_more;
public:
	BaseDialog *m_pBaseDlg;
public:
	BOOL IsPermit();
	void SetIntention(Param &pm);
	LPCTSTR GetIntention();
	void SetSrcPath(LPCTSTR wszSrcPath);
	LPCTSTR GetSrcPath();
	void SetDesPath(LPCTSTR wszDesPath);
	LPCTSTR GetDesPath();

};

